<?php

/**
 * 品质豪宅
 */

namespace app\api\model;


use PDOStatement;
use think\Db;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\DbException;
use think\Model;

class Villa extends Model {

    /**
     * 获取豪宅配置
     * @param $city_code
     * @return array|PDOStatement|string|Model|null
     * @throws DataNotFoundException
     * @throws ModelNotFoundException
     * @throws DbException
     */
    public static function get_price($city_code) {
        return Db::name('villa')->where("city_code", $city_code)->field('price')->find();
    }

}
